package com.zpf.controller;

import com.zpf.entity.User;
import com.zpf.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: SimpleProviderUserController
 * @Description: TODO
 * @Autor: ZPF
 * @Date: 2021/1/13 10:53
 **/
@RestController
public class SimpleProviderUserController {

    @Autowired
    private UserRepository userRepository;

    @GetMapping("/simple/{id}")
    public User findById(@PathVariable Long id) {
        User user = this.userRepository.getOne(id);
        return user;
    }

}
